package com.example.module_main.http

import com.example.lib_net.NetModule
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object MainNetModule {

    @Provides
    @Singleton
    @CommonMainApi
    fun provideMainApi(@NetModule.CommonRetrofit retrofit: Retrofit):MainApi{
        return retrofit.create(MainApi::class.java)
    }

    @Provides
    @Singleton
    @SignMainApi
    fun provideSignMainApi(@NetModule.SignRetrofit retrofit: Retrofit):MainApi{
        return retrofit.create(MainApi::class.java)
    }

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonMainApi


    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class SignMainApi



}